<template>
<div class="cats">
  <nav-bar class="catsbar">
     <div class="center" slot="nav-center">购物车({{catlength}})</div>
  </nav-bar>
  <scroll class="scroll" ref="scroll">
  <cats-list /> 
  </scroll>
  <cats-bottom-bar />
</div>
</template>

<script>
import NavBar from 'components/common/navbar/navbar'
import CatsList from './chidencats/catslist'
import CatsBottomBar from './chidencats/catsbottombar'
import Scroll from 'components/common/scroll/scroll'
import {mapGetters} from 'vuex'
export default {
  name:'Cats',
  components: {
    NavBar,CatsList,CatsBottomBar,Scroll
  },
  computed: {
    ...mapGetters([
       'catlength'
    ])
  },
  activated () {
    this.$refs.scroll.refresh()
  }
}
</script>

<style scoped>
.cats{
  height: 100vh;
}
 .center{
   font-size: 18px;
   text-align: center;
 }
.catsbar{
  background-color: var(--color-high-text);
  position: relative;
  z-index: 9;

}
.scroll{
  height: calc(100% - 133px);
}
</style>